/*
qua 品质
*/
window._SHOPHELPER = {

  showShopLevelDesc:function(shopName){

    if(_SHOP[shopName]&&_SHOP[shopName].sell&&_SHOP[shopName].sell.length>0){

      var shoplv = _GAMEDATAHELPER.getShopLevel(shopName)+1;

      if(_SHOP[shopName].sell[shoplv]&&_SHOP[shopName].sell[shoplv].length>0){

        var result = "下一级新增商品:";

        result+=_SHOP[shopName].sell[shoplv].join(',')+"\n";

        return result;
      }
    }

    return "无";

  },

  initSell:function(){

    //var configobj = _EQUIP;
    var configobj = _SKILLBD;

    var sellMap = {};
    var sellArr = [];
    for(var key in configobj){

      var cobj = configobj[key];

      var mapkey = 0;
      for(var xwkey in cobj.xw){
        mapkey = cobj.xw[xwkey]
      }

      if(!sellMap[mapkey]){
        sellMap[mapkey] = {key:mapkey,arr:[]};
      }

      sellMap[mapkey].arr.push(key);

    }

    
    for(var key in sellMap){
      sellArr.push(sellMap[key]);
    }

    sellArr.sort((a,b)=>{
      return a.key-b.key;
    });

    console.log(sellArr);

    var arrstr = "[";

    for(var i=0;i<sellArr.length;i++){

      arrstr+="[";

      for(var j=0;j<sellArr[i].arr.length;j++){

        arrstr+='"'+sellArr[i].arr[j]+'",'

      }

      arrstr+="],\n";
    }

    arrstr+="]";

    console.log(arrstr);

  }

};

window._SHOP = {
'挑战':{type:'tz'},
'镶嵌':{type:'xq'},
'酒馆商':{type:'jg'},
'妖怪商人':{type:'jgshop',race:'yao'},
'人类商人':{type:'jgshop',race:'ren'},
'神仙商人':{type:'jgshop',race:'xian'},


'技能商':{type:'item',bindtj:1},
'被动技能商':{type:'item',bindtj:1},

//固定升级商人
'道具商':{type:'item',sell:[
  ['金砖','银砖','冰砖','炉石','铁葫芦'],
  ['稀有金砖','稀有银砖','稀有冰砖','银葫芦'],
  ['史诗金砖','史诗银砖','史诗冰砖','金葫芦'],
  ['传奇金砖','传奇银砖','传奇冰砖','老葫芦'],
  ['神话金砖','神话银砖','神话冰砖','照妖镜']
]},     
'丹药商':{type:'item',sell:[
  ['老酒','仙丹','融合丹','遗忘之水','驱妖丹'],
  ['稀有老酒','稀有仙丹'],
  ['史诗老酒','史诗仙丹','改名卡'],
  ['传奇老酒','传奇仙丹'],
  ['神话老酒','神话仙丹','魔镜'],
]},
'装备商':{type:'item',sell:[
  ["红岩刀","真空枪","赤龙剑","半月弓","五明扇","玉骨杖","黑龙铠","鱼鳞甲","白羽衣","太极图",],
  ["【真】红岩刀","【真】真空枪","【真】赤龙剑","【真】半月弓","【真】五明扇","【真】玉骨杖","【真】黑龙铠","【真】鱼鳞甲","【真】白羽衣","【真】太极图",],
  ["【极】红岩刀","【极】真空枪","【极】赤龙剑","【极】半月弓","【极】五明扇","【极】玉骨杖","【极】黑龙铠","【极】鱼鳞甲","【极】白羽衣","【极】太极图",],
  ["【幻】红岩刀","【幻】真空枪","【幻】赤龙剑","【幻】半月弓","【幻】五明扇","【幻】玉骨杖","【幻】黑龙铠","【幻】鱼鳞甲","【幻】白羽衣","【幻】太极图",],
  ["黑曜破军刀","皇极奔雷枪","九天流影剑","乾坤震天弓","月影星辉扇","沐雨春风杖","焰烈飞金铠","天罡无极甲","八卦紫绶衣","混元金斗",],
  ["【真】黑曜破军刀","【真】皇极奔雷枪","【真】九天流影剑","【真】乾坤震天弓","【真】月影星辉扇","【真】沐雨春风杖","【真】焰烈飞金铠","【真】天罡无极甲","【真】八卦紫绶衣","【真】混元金斗",],
  ["【极】黑曜破军刀","【极】皇极奔雷枪","【极】九天流影剑","【极】乾坤震天弓","【极】月影星辉扇","【极】沐雨春风杖","【极】焰烈飞金铠","【极】天罡无极甲","【极】八卦紫绶衣","【极】混元金斗",],
  ["【幻】黑曜破军刀","【幻】皇极奔雷枪","【幻】九天流影剑","【幻】乾坤震天弓","【幻】月影星辉扇","【幻】沐雨春风杖","【幻】焰烈飞金铠","【幻】天罡无极甲","【幻】八卦紫绶衣","【幻】混元金斗",],
  ["金刚降魔杵","天焱流火枪","紫电青霜剑","万里起云烟","煌天金翎扇","蟠龙神木杖","云天青龙铠","七彩流光衣","炼魂紫金钵",],
  ["【真】金刚降魔杵","【真】天焱流火枪","【真】紫电青霜剑","【真】万里起云烟","【真】煌天金翎扇","【真】蟠龙神木杖","【真】云天青龙铠","【真】蚩尤血炼甲","【真】七彩流光衣","【真】炼魂紫金钵",],
  ["【极】金刚降魔杵","【极】天焱流火枪","【极】紫电青霜剑","【极】万里起云烟","【极】煌天金翎扇","【极】蟠龙神木杖","【极】云天青龙铠","【极】蚩尤血炼甲","【极】七彩流光衣","【极】炼魂紫金钵",],
  ["【幻】金刚降魔杵","【幻】天焱流火枪","【幻】紫电青霜剑","【幻】万里起云烟","【幻】煌天金翎扇","【幻】蟠龙神木杖","【幻】云天青龙铠","【幻】蚩尤血炼甲","【幻】七彩流光衣","【幻】炼魂紫金钵",],
]},

'锻造商':{type:'dz'},
'融合商':{type:'rh'},
'传家宝':{type:'cjb'},
'boss接引人':{type:'bossjy'},
'木头回收商':{type:'wood'},
'时装商':{type:'pf'},
'寄存商':{type:'saveTeam'},
}